import React from 'react'
import {  Route, Link,Redirect  } from "react-router-dom";
import Alpha from "./Books/Alpha"
import Beta from "./Books/Beta"
import { Divider,  Layout,  Button} from 'antd'
import 'antd/dist/antd.css'

class App extends React.Component {

state = {
   
    thisistrue:true,
    thisisfalse:false
};


thistrue01(){
    this.thisistrue=true;
    this.thisisfalse=!this.thisistrue
}
thistrue02(){
    this.thisisfalse=true;
    this.thisistrue=!this.thisisfalse
}

    render() {
        const {initLoading,loading,list,thisistrue,thisisfalse}=this.state;
        return (
                                <div  className="content-col" style={{background: "#FFFFFF",postiion:"relative"}}>
                                    <div>
                                   <Button type="link" className={this.thisistrue?"primary":"gray"} onClick={()=>this.thistrue01()} >
                                    <Link to="/book/alpha/page:1" >阿尔法    </Link></Button>
                                   <Button  type="link"  className={this.thisisfalse?"primary":"gray"} onClick={()=>this.thistrue02()}>
                                        <Link to="/book/beta/page:1" >贝塔</Link></Button>
                                </div>
                                <hr className="oneline"/>
                                <div>
                                    <Route path="/book/alpha" exact component={Alpha}></Route>
                                    <Route path="/book/alpha/page:page"  component={Alpha}></Route>
                                    <Route path="/book/beta"  component={Beta}></Route>
                                    <Route path="/book/beta/page:page"  component={Beta}></Route>
                                    <Redirect to="/book/alpha/page:1" />
                                </div>
                           
                               
                       
                                </div>

                      
             
        )
    }
}

export default App
